package speed2010.util;

import java.util.Comparator;

/**
 * Classe que representa um comparador de inteiros
 */
public class ComparatorMetaInfo implements Comparator<MetaInfo> {
	
	public ComparatorMetaInfo() {
	}

	/*
	 * @param o1 the first object to be compared. @param o2 the second object to
	 * be compared. @return a negative integer, zero, or a positive integer as
	 * the first argument is less than, equal to, or greater than the second.
	 */
	public int compare(MetaInfo n1, MetaInfo n2) {
		if (n1.getCusto() < n2.getCusto())
			return -1;
		if (n1.getCusto() > n2.getCusto())
			return 1;
		return 0;
	}
}
